package org.shagin.jfin.data.model;

import java.util.Currency;

import org.shagin.jfin.data.model.domain.AccountDomain;
import org.shagin.jfin.data.model.domain.CostCenterDomain;
import org.shagin.jfin.data.model.domain.OperationRuleDomain;
import org.shagin.jfin.date.cond.DateRange;
import org.shagin.jfin.model.event.BudgetListener;

/**
 * The Interface IBudget.
 */
public interface IBudget extends IIdObject<String> {

    /**
     * Gets the default currency.
     * 
     * @return the default currency
     */
    Currency getDefaultCurrency();

    /**
     * Total amount.
     * 
     * @return the double
     */
    double totalAmount();

    /**
     * Gets the operation rule domain.
     * 
     * @return the operation rule domain
     */
    OperationRuleDomain getOperationRuleDomain();

    /**
     * Gets the account domain.
     * 
     * @return the account domain
     */
    AccountDomain getAccountDomain();

    /**
     * Gets the cost center domain.
     * 
     * @return the cost center domain
     */
    CostCenterDomain getCostCenterDomain();

    /**
     * Adds the budget listener.
     * 
     * @param l the l
     */
    void addBudgetListener(BudgetListener l);

    /**
     * Removes the budget listener.
     * 
     * @param l the l
     */
    void removeBudgetListener(BudgetListener l);
    /**
     * Fire account added event.
     * 
     * @param account the account
     */
    void fireAccountAddedEvent(Account account);

    /**
     * Fire account changed event.
     * 
     * @param account the account
     */
    void fireAccountChangedEvent(Account account);

    /**
     * Fire changed event.
     */
    void fireChangedEvent();

    /**
     * Fire cost center changed event.
     * 
     * @param costCenter the cost center
     */
    void fireCostCenterChangedEvent(CostCenter costCenter);

    /**
     * Fire cost center added event.
     * 
     * @param costCenter the cost center
     */
    void fireCostCenterAddedEvent(CostCenter costCenter);

    /**
     * Fire operation rule changed event.
     * 
     * @param operationRule the operation rule
     */
    void fireOperationRuleChangedEvent(OperationRule operationRule);

    /**
     * Fire operation rule addedd event.
     * 
     * @param operationRule the operation rule
     */
    void fireOperationRuleAddedEvent(OperationRule operationRule);

    /**
     * Fire operation rule deleted event.
     * 
     * @param operationRule the operation rule
     */
    void fireOperationRuleDeletedEvent(OperationRule operationRule);

    /**
     * Fire operation category added event.
     * 
     * @param operationCategory the operation category
     */
    void fireOperationCategoryAddedEvent(OperationCategory operationCategory);

    /**
     * Fire operation category deleted event.
     * 
     * @param operationCategory the operation category
     */
    void fireOperationCategoryDeletedEvent(OperationCategory operationCategory);

    /**
     * Fire operation category changedd event.
     * 
     * @param operationCategory the operation category
     */
    void fireOperationCategoryChangedEvent(OperationCategory operationCategory);

    /**
     * Gets the range.
     * 
     * @return the range
     */
    DateRange getDateRange();
}
